<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>登录</title>
	<link rel="stylesheet" href="css/denglu.css">
	<link rel="stylesheet" href="css/reset.css">
	<style>
    	.bg{
    	background-image: url(images/微信图片_20190304190606.png);
    background-repeat: no-repeat;
    background-color: #b8e5f8;
    background-size: cover;
    width: 100%;
    height: 100vh;
    overflow: auto;
    padding-right: 15px;
    }
    body{
    	 overflow-x : hidden;   /*去掉横条*/
     /*overflow-y : hidden;   去掉竖条*/
    }

	</style>
</head>
<body>
<form action="{% url 'denglu2' %}" method="post">
    	<div class="bg">
		<div class="zhucebox">
			<p class="logo">知乎</p>
			<span class="box1" >登录知乎,发现更多可信赖的解答</span>
			<br>
			<br>
			<input type="text" value="" placeholder="请输入账号:" id="phone" name="username"/ style="display:inline-block">
			<input type="text" value="" placeholder="请输入密码:" id="phone" name="password"/ style="display:inline-block">


			<button type="submit" class="Button">
				登录
			</button>
			<span><a href="#" class="denglumethod">二维码登录·海外手机登录·社交账号登录
            </a></span>
            <div class="switch">
            	<p>没有账号？<a href="#">注册</a></p>
            </div>

		</div>
		<div class="xiazaibox">
			<div class="xiazai_w">
			<button class="xiazai">下载知乎App</button>
			</div>

		</div>
		<div class="footer">
		<div class="zhihulinks">
			<p>知乎专栏·圆桌·发现·移动应用·联系我们·来知乎工作·注册机构号</p>
		</div>
		<div class="zhihulinks1">
			<p>
© 2019 知乎·京 ICP 证 110745 号·京公网安备 11010802010035 号出版物经营许可证
			</p>
		</div>
		<div class="zhihulinks2">
		<p>
侵权举报·网上有害信息举报专区·儿童色情信息举报专区·违法和不良信息举报：010-82716601</p>
		</div>
		<div class="zhihulinks3">
			<img src="images/chengxing_logo@2x.65dc76e8.png" alt="">
		</div>

	</div>
</form>

</body>
</html>
<script>
    // 验证手机号
//    手机号是不是11位
//    手机号前2位以18、15、13、14开始，后9位为数字
    var phone=document.getElementById("phone");
    var btn=document.getElementById("btn");
    btn.onclick=function () {
        var pv=phone.value;
        console.log(pv);
        var reg=/^(13|14|15|18)[0-9]{9}$/;
        //var reg=/^1[3458][0-9]{9}$/;
        if(reg.test(pv)){
            alert("请输入六位短信验证码");
        }else{
            alert("请输入正确的手机号");
        }
    }
</script>